package serviceImpl;

import bean.Users;
import mapper.UsersMapper;
import org.springframework.stereotype.Service;
import service.UserService;
import util.JwtUtil;

import javax.annotation.Resource;

@Service
public class UserserviceImpl implements UserService {

    @Resource
    private UsersMapper usersMapper;

    @Override
    public Users SelectById(String token) {
        String s="";
        if (token!=null){
            s=JwtUtil.tokenCentos(token,"Identification");
            System.out.println(s);
            return usersMapper.selectBytoken(s);
        }else {
            return null;
        }
    }
}
